package com.cn.stusy0015.demo005;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName TestReg.java
 * @Description
 * @createTime 2023年05月20日 10:02:00
 */
public class TestReg {
    public static void main(String[] args) {
        System.out.println("***欢迎进入注册系统***");
        Register reg = new Register();
        Scanner sc = new Scanner(System.in);
        int i=0;
        do {
            i++;
            System.out.print("请输入用户名：");
            String name = sc.next();
            System.out.print("请输入密码：");
            String pwd = sc.next();
            System.out.print("请再次输入密码：");
            String pwdAgain = sc.next();
            if (reg.verify(name, pwd, pwdAgain)){
                break;
            }else if (i < 3){
                continue;
            }
        }while (i<3);
    }
}
